package com.base.common.result;

import com.base.common.result.StatusCode;

/**
 * @author zhou minghao
 * @date 2024/4/22
 * @description 定义返回的code和msg
 */
public enum ResultCode implements StatusCode {
    SUCCESS(1000,"请求成功"),
    ERROR(500,"请求失败"),
    VALIDATE_ERROR(1002,"参数校验失败"),
    RESPONSE_PACK_ERROR(1003,"response返回包装失败"),
    USER_ACCOUNT_DISABLE(2005, "账号被禁用"),
    UNKNOWN_ERROR(501,"未知的错误");

    private int code;
    private String msg;



    ResultCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
